package com.chinaunicom.bigcustomer.controller;


import java.util.List;

import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.chinaunicom.bigcustomer.model.Customer;
import com.chinaunicom.bigcustomer.service.ICustomerService;
import com.chinaunicom.bigcustomer.service.ITelinfoService;
import com.chinaunicom.bigcustomer.service.impl.TelinfoServiceImpl;

@Controller
@RequestMapping("/customer/info")
public class CustomerController {

	@Resource
	private ICustomerService customerService;
	
	@Resource
	private ITelinfoService telinfService;
/*
 * 查询所有的客户信息
 * 
 */
	@RequestMapping("/query")
	public String query(Model model) throws Exception{
		List<Customer> list = customerService.query(null);
		// 将查询的数据传递到跳转的jsp页面
		model.addAttribute("list", list);
		return "/WEB-INF/bigcustmer/customer/list.jsp";
	}
	
	
	
	

}
